home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
026a
/
strdct.zip
/
STRDCT.MDX
(
.txt
)
< prev
next >
Wrap
dBASE Multiple Index
|
1991-01-24
|
10KB
|
248 lines
STRDCT
case 'I' : nocase=1;
break;
case 'd' :
case 'D' : descend=1;
break;
case 'f' :
case 'F' : dofast=1;
break;
case 'o' :
case 'O' : output = &argv[i][2];
break;
default
STRDCTIA
STRDCTID
STRDCTCA
STRDCTCD
if (!strrchr(filename,'.') ||
strrchr(filename,'.')<strrchr(filename,'\\'))
strcat(filename,".SO");
if (!(fp=fopen(filename,"rb")))
hferror("Unable to open sort order file -> ",filename,0);
if (output) /* We we open up output file ?*/
if (!(ofp=fopen(output,"wt")))
hferror("Unable to open output file -> ",output,0);
/* If we don't care about case then read the first helf of the file */
if (fseek(fp,(long)(nocase ? 8-fw2:264-fw2),SEEK_SET))
hferror("Unable to seek in -> ",filename,0);
if (fread(buffer,sizeof(char),256,fp) < 256)
hferror("Unable to read character data from -> ",filename,0);
fprintf(ofp,"\t/* Read from %s (Framework %s)\n" \
"\t Table is case %s \n" \
"\t Table is in %s order */\n",
filename,
fw2 ? "II":"III",
nocase ? "insensitive":"sensitive",
descend ? "descending":"ascending");
if (dofast)
fprintf(ofp,"\tstatic unsigned char trnslt[256]={\n");
else
fprintf(ofp,"\tstatic unsigned char trnslt[256];\n");
/* Write out our table with four assignments per line */
for(i=0;i<256;i++) {
if (!(i % (4 + (dofast ? 8:0)))) /* Print four/16 per line */
fprintf(ofp,"\n\t");
if (!dof
CALL("strdctia",testfield+"")
7l
l7
CALL("strdctid",testfield+"")
7l
CALL("strdctca",testfield+"")
7l
k
CALL("strdctcd",testfield+"")
7l
7l i
7l
l7
l7 ~r
cept:
l:ESC
key...
key...
key...
rol: SPACEBAR:Nex sc
enful
RETURN:St
scroll.
Proceed
kept.
key...
Wildc
key...
File]
to itself
to itself
to itself
es/di
a~ on.
key...
n ign
key...
:Execu~
ESC:Ab
:Se Ctrl_End:Co
ESC:Ab
key...
disk di
wait...
augh~r.
key...
too long
key...
key...
on di
key...
nied.
key...
doesn'
key...
key...
faul driv
saved
driv
Shift-F1 PICK
cept:
l:ESC
key...
key...
key...
rol: SPACEBAR:Nex sc
enful
RETURN:St
scroll.
Proceed
kept.
key...
Wildc
key...
File]
to itself
to itself
to itself
es/di
a~ on.
key...
n ign
key...
:Execu~
ESC:Ab
:Se Ctrl_End:Co
ESC:Ab
key...
disk di
wait...
augh~r.
key...
too long
key...
key...
on di
key...
nied.
key...
doesn'
key...
key...
faul driv
saved
driv
Shift-F1 PICK
i
7
k ~r
cept:
l:ESC
key...
key...
key...
rol: SPACEBAR:Nex sc
enful
RETURN:St
scroll.
Proceed
kept.
key...
Wildc
key...
File]
to itself
to itself
to itself
es/di
a~ on.
key...
n ign
key...
:Execu~
ESC:Ab
:Se Ctrl_End:Co
ESC:Ab
key...
disk di
wait...
augh~r.
key...
too long
key...
key...
on di
key...
nied.
key...
doesn'
key...
key...
faul driv
saved
driv
Shift-F1 PICK
cept:
l:ESC
key...
key...
key...
rol: SPACEBAR:Nex sc
enful
RETURN:St
scroll.
Proceed
kept.
key...
Wildc
key...
File]
to itself
to itself
to itself
es/di
a~ on.
key...
n ign
key...
:Execu~
ESC:Ab
:Se Ctrl_End:Co
ESC:Ab
key...
disk di
wait...
augh~r.
key...
too long
key...
key...
on di
key...
nied.
key...
doesn'
key...
key...
faul driv
saved
driv
Shift-F1 PICK